<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\widgets\LinkPager;
use yii\helpers\Url;
$this->params['breadcrumbs'][] = $this->title;

?>
<style type="text/css">.topFixed{line-height: 24px;}</style>
  <div class=" index fenlei">

    <div class="weui_navbar topFixed fenleiTop">
      <a href="/" style="color:black;"><i class="iconfont icon-return"></i></a>
      <div class="weui_cell_bd weui_cell_primary">
        <div class="weui_search_bar" id="search_bar">
          <form class="weui_search_outer" action="/product" method="get" onsubmit="return checkform();">
            <div class="weui_search_inner">
              <i class="weui_icon_search"></i>
              <input type="search" name="name" class="weui_search_input" id="search_input" placeholder="搜索">
              <a href="javascript:" class="weui_icon_clear" id="search_clear"></a>
            </div>
            <label for="search_input" class="weui_search_text" id="search_text">
              <i class="weui_icon_search"></i>
              <span >搜索</span>
            </label>
          </form>
          <div class="searchBtn"><i class="weui_icon_search"></i></div>
        </div>
      </div>
      <a href="/" style="color:black;"><i class="iconfont icon-home"></i></a>
    </div>

    <div class="sortArea-nav">
      <ul class="autoHeight">

        <?php foreach ($category_1 as $key => $v): ?>
          
          <a href="/category?cate=<?=Html::encode($v['id'])?>" style="color:#333">
            <li <?php if($cate == $v['id']) echo "class='active'"; ?>><?=Html::encode($v['name'])?></li>
          </a>
          
        <?php endforeach ?>
      </ul>
    </div>

    <div class="sortArea-cont">

      <ul class="autoHeight">

        <?php foreach ($category_2 as $key => $value): ?>

          <li>
          <a href="/product/index/?lv2=<?=Html::encode($value['id'])?>"><?=Html::encode($value['name'])?></a>
          </li>

        <?php endforeach ?>
      </ul>
      
    </div>

  </div>